﻿@model LeEdu.MODEL.Judge
           @using LeEdu.BLL;
@using LeEdu.MODEL
@{
    Layout = null;
}

<!DOCTYPE html>
<script src="~/Content/ckeditor/ckeditor.js"></script>
<html>


@Html.Partial("~/Views/Shared/HouTai_Header.cshtml")
<body>
    <!-- 网页导航菜单分布视图 -->
    @Html.Partial("~/Views/Shared/HouTai_DaoHang.cshtml")
    <div class="container">

        <div class="es-section course-manage-header clearfix">
            @*<a href="/course/157">*@
                @{
                if (Session["CoursesCImage"].ToString() == "#")
                {
                <img class="picture" src="~/Content/img/user.png">
                }
                else
                {
                <img class="picture" src="~/Content/images/@Session["CoursesCImage"]">
                }
                @*<img class="picture" src="/assets/img/default/course.png?6.15.2">*@
                }
            @*</a>*@
            <h1 class="title">
                @*<a class="link-dark" href="/course/157">*@
                @Session["CoursesCSutTitle"]
                @*</a>*@
            </h1>

            <div class="teachers">
                教师：
                @*<a href="/user/4">*@
                @Session["CoursesCreatePeople"]
                @*</a>*@
            </div>

            <div class="toolbar hidden-xs">

                <div class="btn-group">
                    <a class="btn btn-default btn-sm" href="/course/index">返回课程主页</a>
                </div>

                <div class="btn-group">
                    <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">预览 <span class="caret"></span></button>
                    <ul class="dropdown-menu pull-right">
                        <li><a href="/course/157?previewAs=member" target="_blank">作为 已购买用户</a></li>
                        <li><a href="/course/157?previewAs=guest" target="_blank">作为 未购买用户</a></li>
                    </ul>
                </div>


            </div>
        </div>

        <div class="row">

            <!-- 网页左侧菜单分布视图 -->
            @Html.Partial("~/Views/Shared/CouseCreateManage_Menu_Left.cshtml")


            <div class="col-md-10">


                <div class="panel panel-default panel-col">
                    <div class="panel-heading clearfix">
                        题目管理
                    </div>
                    <div class="panel-body">

                        <ol class="breadcrumb">
                            <li><a href="/course/157/manage/question">题目管理</a></li>
                            <li class="active">添加题目</li>
                        </ol>

                        <div id="question-creator-widget" data-upload-url="/course/157/manage/question/uploadfile/determine" data-media-upload-params-url="/uploadfile/params?targetType=question&amp;targetId=0" data-media-upload-callback-url="/uploadfile/cloud_callback?targetType=question&amp;targetId=0" data-widget-cid="widget-0">
                            <form id="question-create-form" data-role="question-form" class="form-horizontal quiz-question" method="post" action="/Course/AddJudTo" novalidate="novalidate" data-widget-cid="widget-1">


                                <div class="form-group">
                                    <div class="col-md-2 control-label"><label>从属</label></div>
                                    <div class="col-md-8 controls">
                                        <select class="form-control width-input width-input-large" name="target" data-role="target">
                                            @{                                              
                                                CourseBLL cbll=new CourseBLL();
                                                int id = Convert.ToInt32(Session["Coursesid"]);
                                                List<Courses> courlist=cbll.GetAll().Where(p=>p.CoursesId==id).ToList();
                                                foreach (var item in courlist)
                                                {
                                                    <option value="course-157/lesson-168">@item.CoursesName</option>
                                                }
                                            }                 
                                        </select>
                                        <div class="help-block">可以针对本课程或者某个课时出题</div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-md-2 control-label"><label>难度</label></div>
                                    <div class="col-md-8 controls radios">
                                        @Html.RadioButton("Difficulty", 0)简单
                                        @Html.RadioButton("Difficulty", 1, true)一般
                                        @Html.RadioButton("Difficulty", 2)困难
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-md-2 control-label"><label for="question-stem-field">题干</label></div>
                                    <div class="col-md-8 controls">
                                        <textarea class="form-control" id="question-stem-field" data-image-upload-url="/editor/upload?token=NHxjb3Vyc2V8aW1hZ2V8MTQ2MDQ4NDc1Nnw1YzlkODhkYWJhYTgxODkwYjBiZjYwMzhhMTRmYzU5OQ" data-image-download-url="/editor/download?token=NHxjb3Vyc2V8aW1hZ2V8MTQ2MDQ4NDc1Nnw1YzlkODhkYWJhYTgxODkwYjBiZjYwMzhhMTRmYzU5OQ" name="Stem" style="height: 180px; visibility: hidden; display: none; " data-widget-cid="widget-2" data-explain=""></textarea>
                                        <script type="text/javascript"> CKEDITOR.replace('Stem');</script>
                                        <div class="help-block" style="display:none;"></div>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <div class="col-md-2 control-label"><label>答案</label></div>
                                    <div class="col-md-8 controls radios ">
                                        @Html.RadioButton("Correct", 0, true)正确
                                        @Html.RadioButton("Correct", 1)错误
                                        <div class="help-block" style="display:none;"></div>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <div class="col-md-8 col-md-offset-2 controls ">
                                        <a href="javascript:;" data-toggle="collapse" data-role="advanced-collapse" data-target="#advanced-collapse" class="text-success collapsed">» 显示/隐藏 高级选项 ...</a>
                                    </div>
                                </div>

                                <div id="advanced-collapse" class="advanced-collapse collapse">
                                    <div class="form-group">
                                        <div class="col-md-2 control-label"><label for="question-analysis-field">解析</label></div>
                                        <div class="col-md-8 controls">
                                            <textarea class="form-control" id="question-analysis-field" data-image-upload-url="/editor/upload?token=NHxjb3Vyc2V8aW1hZ2V8MTQ2MDQ4NDc1Nnw1YzlkODhkYWJhYTgxODkwYjBiZjYwMzhhMTRmYzU5OQ" name="Analysis" data-image-download-url="/editor/download?token=NHxjb3Vyc2V8aW1hZ2V8MTQ2MDQ4NDc1Nnw1YzlkODhkYWJhYTgxODkwYjBiZjYwMzhhMTRmYzU5OQ" style="visibility: hidden; display: none; "></textarea>
                                            <script type="text/javascript"> CKEDITOR.replace('Analysis');</script>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <div class="col-md-2 control-label"><label for="question-score-field">分值</label></div>
                                        <div class="col-md-4 controls">
                                            <input class="form-control" value="2" type="text" id="question-score-field" name="Value" data-widget-cid="widget-3" data-explain="">
                                            <div class="help-block" style="display:none;"></div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-md-8 col-md-offset-2 controls">
                                        <button type="submit" data-role="submit" class="btn btn-primary submit-btn" data-submission="continue">保存并继续添加</button>
                                        <button type="submit" data-role="submit" class="btn btn-primary submit-btn" data-submission="submit">保存</button>
                                        <a href="/Course/TitleManage/@Session[" coursesid"]" class="btn btn-link">返回</a>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>